home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE06 / TIPTRIX / LISTING1.PAS next >
Encoding:
Pascal/Delphi Source File  |  1996-01-13  |  605 b   |  34 lines

  1. unit SetNames;
  2. interface
  3.  uses
  4.   TypInfo,
  5.   SysUtils, WinTypes, WinProcs, Messages, Classes,
  6.   Graphics, Controls, Forms, Dialogs, StdCtrls;
  7.  
  8.  type
  9.   TForm1 = class(TForm)
  10.     Memo1: TMemo;
  11.     procedure FormCreate(Sender: TObject);
  12.   private
  13.   public
  14.   end;
  15.  
  16.  var
  17.   Form1: TForm1;
  18.  
  19. implementation
  20.  
  21.  {$R *.DFM}
  22.  
  23.  procedure TForm1.FormCreate(Sender: TObject);
  24.  var
  25.   aState:TWindowState;
  26.  begin
  27.   Memo1.Lines.Clear;
  28.   with Memo1.Lines do
  29.     for aState:=low(TWindowState) to high(TWindowState) do
  30.       Add(GetEnumName(TypeInfo(TWindowState),ord(aState))^);
  31.  end;
  32.  
  33.  end. 
  34.